

package com.hazelcast.internal.networking;

/**
 * Initializes the Channel when the Channel is used for the first time.
 */
public interface ChannelInitializer {

    /**
     * Initializes the channel.
     * <p>
     * So it will set up the (initial) pipeline of handlers, configure the
     * underlying transport (socket e.g.).
     *
     * @param channel the Channel to initialize.
     * @throws Exception if something fails while initializing the Channel.
     */
    void initChannel(Channel channel) throws Exception;
}
